module(
    name = "rabbitmq-server",
    version = "4.0.0",
)

bazel_dep(
    name = "rules_pkg",
    version = "0.10.1",
)

bazel_dep(
    name = "bazel_skylib",
    version = "1.7.1",
)

bazel_dep(
    name = "aspect_bazel_lib",
    version = "2.5.3",
)

bazel_dep(
    name = "platforms",
    version = "0.0.8",
)

bazel_dep(
    name = "rules_cc",
    version = "0.0.9",
)

bazel_dep(
    name = "rules_oci",
    version = "1.7.4",
)

bazel_dep(
    name = "container_structure_test",
    version = "1.16.0",
)

bazel_dep(
    name = "gazelle",
    version = "0.33.0",
    repo_name = "bazel_gazelle",
)

bazel_dep(
    name = "rules_erlang",
    version = "3.16.0",
)

bazel_dep(
    name = "rules_elixir",
    version = "1.1.0",
)

bazel_dep(
    name = "rabbitmq_osiris",
    version = "1.8.2",
    repo_name = "osiris",
)

erlang_config = use_extension(
    "@rules_erlang//bzlmod:extensions.bzl",
    "erlang_config",
)

use_repo(
    erlang_config,
    "erlang_config",
)

elixir_config = use_extension(
    "@rules_elixir//bzlmod:extensions.bzl",
    "elixir_config",
)

use_repo(
    elixir_config,
    "elixir_config",
)

register_toolchains(
    "@elixir_config//external:toolchain",
)

erlang_package = use_extension(
    "@rules_erlang//bzlmod:extensions.bzl",
    "erlang_package",
)

erlang_package.hex_package(
    name = "accept",
    build_file = "@rabbitmq-server//bazel:BUILD.accept",
    sha256 = "11b18c220bcc2eab63b5470c038ef10eb6783bcb1fcdb11aa4137defa5ac1bb8",
    version = "0.3.5",
)

erlang_package.hex_package(
    name = "aten",
    build_file = "@rabbitmq-server//bazel:BUILD.aten",
    sha256 = "5f39a164206ae3f211ef5880b1f7819415686436e3229d30b6a058564fbaa168",
    version = "0.6.0",
)

erlang_package.hex_package(
    name = "base64url",
    build_file = "@rabbitmq-server//bazel:BUILD.base64url",
    sha256 = "f9b3add4731a02a9b0410398b475b33e7566a695365237a6bdee1bb447719f5c",
    version = "1.0.1",
)

erlang_package.hex_package(
    name = "cowboy",
    build_file = "@rabbitmq-server//bazel:BUILD.cowboy",
    patch_cmds = [
        "rm ebin/cowboy.app",
    ],
    sha256 = "8a7abe6d183372ceb21caa2709bec928ab2b72e18a3911aa1771639bef82651e",
    version = "2.12.0",
)

erlang_package.hex_package(
    name = "cowlib",
    build_file = "@rabbitmq-server//bazel:BUILD.cowlib",
    patch_cmds = [
        "rm ebin/cowlib.app",
    ],
    sha256 = "e1e1284dc3fc030a64b1ad0d8382ae7e99da46c3246b815318a4b848873800a4",
    version = "2.13.0",
)

erlang_package.hex_package(
    name = "credentials_obfuscation",
    build_file = "@rabbitmq-server//bazel:BUILD.credentials_obfuscation",
    sha256 = "738ace0ed5545d2710d3f7383906fc6f6b582d019036e5269c4dbd85dbced566",
    version = "3.4.0",
)

erlang_package.hex_package(
    name = "csv",
    build_file = "@rabbitmq-server//bazel:BUILD.csv",
    sha256 = "f5ee7299a55ff84fbe623d9aea7218b800d19ecccb2b3eac2bcb327d644365ea",
    version = "3.2.0",
)

erlang_package.hex_package(
    name = "cuttlefish",
    build_file = "@rabbitmq-server//bazel:BUILD.cuttlefish",
    sha256 = "d3ef90bd2f5923477ab772fbda5cd5ad088438e4fd56801b455b87ada9f46fa3",
    version = "3.1.0",
)

erlang_package.hex_package(
    name = "eetcd",
    build_file = "@rabbitmq-server//bazel:BUILD.eetcd",
    sha256 = "66493bfd6698c1b6baa49679034c3def071ff329961ca1aa7b1dee061c2809af",
    version = "0.3.6",
)

erlang_package.hex_package(
    name = "enough",
    build_file = "@rabbitmq-server//bazel:BUILD.enough",
    sha256 = "0460c7abda5f5e0ea592b12bc6976b8a5c4b96e42f332059cd396525374bf9a1",
    version = "0.1.0",
)

erlang_package.hex_package(
    name = "gen_batch_server",
    build_file = "@rabbitmq-server//bazel:BUILD.gen_batch_server",
    sha256 = "c3e6a1a2a0fb62aee631a98cfa0fd8903e9562422cbf72043953e2fb1d203017",
    version = "0.8.8",
)

erlang_package.hex_package(
    name = "getopt",
    build_file = "@rabbitmq-server//bazel:BUILD.getopt",
    sha256 = "a0029aea4322fb82a61f6876a6d9c66dc9878b6cb61faa13df3187384fd4ea26",
    version = "1.0.2",
)

erlang_package.hex_package(
    name = "gun",
    build_file = "@rabbitmq-server//bazel:BUILD.gun",
    sha256 = "3106ce167f9c9723f849e4fb54ea4a4d814e3996ae243a1c828b256e749041e0",
    version = "1.3.3",
)

erlang_package.hex_package(
    name = "horus",
    build_file = "@rabbitmq-server//bazel:BUILD.horus",
    sha256 = "4ebcb0ce86c8ee411d24b289c504b14431ee004d9f2c48e6f88d4128ded33a2e",
    version = "0.2.6",
)

erlang_package.hex_package(
    name = "jose",
    build_file = "@rabbitmq-server//bazel:BUILD.jose",
    sha256 = "0d6cd36ff8ba174db29148fc112b5842186b68a90ce9fc2b3ec3afe76593e614",
    version = "1.11.10",
)

erlang_package.hex_package(
    name = "json",
    build_file = "@rabbitmq-server//bazel:BUILD.json",
    sha256 = "9abf218dbe4ea4fcb875e087d5f904ef263d012ee5ed21d46e9dbca63f053d16",
    version = "1.4.1",
)

erlang_package.hex_package(
    name = "khepri",
    build_file = "@rabbitmq-server//bazel:BUILD.khepri",
    sha256 = "dccfaeb3583a04722e2258911f7f906ce67f8efac80504be4923aaafae6d4e21",
    version = "0.14.0",
)

erlang_package.hex_package(
    name = "khepri_mnesia_migration",
    build_file = "@rabbitmq-server//bazel:BUILD.khepri_mnesia_migration",
    sha256 = "f56d277ca7876371615cef9c5674c78854f31cf9f26ce97fd3f4b5a65573ccc4",
    version = "0.5.0",
)

erlang_package.hex_package(
    name = "thoas",
    build_file = "@rabbitmq-server//bazel:BUILD.thoas",
    sha256 = "fc763185b932ecb32a554fb735ee03c3b6b1b31366077a2427d2a97f3bd26735",
    version = "1.0.0",
)

erlang_package.hex_package(
    name = "observer_cli",
    build_file = "@rabbitmq-server//bazel:BUILD.observer_cli",
    sha256 = "a41b6d3e11a3444e063e09cc225f7f3e631ce14019e5fbcaebfda89b1bd788ea",
    version = "1.7.3",
)

erlang_package.hex_package(
    name = "prometheus",
    build_file = "@rabbitmq-server//bazel:BUILD.prometheus",
    sha256 = "719862351aabf4df7079b05dc085d2bbcbe3ac0ac3009e956671b1d5ab88247d",
    version = "4.11.0",
)

erlang_package.hex_package(
    name = "quantile_estimator",
    build_file = "@rabbitmq-server//bazel:BUILD.quantile_estimator",
    sha256 = "282a8a323ca2a845c9e6f787d166348f776c1d4a41ede63046d72d422e3da946",
    version = "0.2.1",
)

erlang_package.hex_package(
    name = "ra",
    build_file = "@rabbitmq-server//bazel:BUILD.ra",
    pkg = "ra",
    sha256 = "fa73d6f36f13198f229cfd1dfafc820318aa974dcdb59ca052cfe2b476756dd8",
    version = "2.13.2",
)

erlang_package.git_package(
    name = "seshat",
    build_file = "@rabbitmq-server//bazel:BUILD.seshat",
    repository = "rabbitmq/seshat",
    tag = "v0.6.1",
)

erlang_package.hex_package(
    name = "ranch",
    build_file = "@rabbitmq-server//bazel:BUILD.ranch",
    patch_cmds = [
        "rm ebin/ranch.app",
    ],
    sha256 = "244ee3fa2a6175270d8e1fc59024fd9dbc76294a321057de8f803b1479e76916",
    version = "2.1.0",
)

erlang_package.hex_package(
    name = "recon",
    build_file = "@rabbitmq-server//bazel:BUILD.recon",
    sha256 = "6c6683f46fd4a1dfd98404b9f78dcabc7fcd8826613a89dcb984727a8c3099d7",
    version = "2.5.3",
)

erlang_package.hex_package(
    name = "redbug",
    build_file = "@rabbitmq-server//bazel:BUILD.redbug",
    sha256 = "3624feb7a4b78fd9ae0e66cc3158fe7422770ad6987a1ebf8df4d3303b1c4b0c",
    version = "2.0.7",
)

erlang_package.hex_package(
    name = "stdout_formatter",
    build_file = "@rabbitmq-server//bazel:BUILD.stdout_formatter",
    sha256 = "51f1df921b0477275ea712763042155dbc74acc75d9648dbd54985c45c913b29",
    version = "0.2.4",
)

erlang_package.git_package(
    build_file = "@rabbitmq-server//bazel:BUILD.syslog",
    repository = "schlagert/syslog",
    tag = "4.0.0",
)

erlang_package.hex_package(
    name = "sysmon_handler",
    build_file = "@rabbitmq-server//bazel:BUILD.sysmon_handler",
    sha256 = "922cf0dd558b9fdb1326168373315b52ed6a790ba943f6dcbd9ee22a74cebdef",
    version = "1.3.0",
)

erlang_package.hex_package(
    name = "systemd",
    build_file = "@rabbitmq-server//bazel:BUILD.systemd",
    sha256 = "8ec5ed610a5507071cdb7423e663e2452a747a624bb8a58582acd9491ccad233",
    version = "0.6.1",
)

use_repo(
    erlang_package,
    "accept",
    "aten",
    "base64url",
    "cowboy",
    "cowlib",
    "credentials_obfuscation",
    "csv",
    "cuttlefish",
    "eetcd",
    "gen_batch_server",
    "getopt",
    "gun",
    "horus",
    "jose",
    "json",
    "khepri",
    "khepri_mnesia_migration",
    "observer_cli",
    "prometheus",
    "ra",
    "ranch",
    "recon",
    "redbug",
    "seshat",
    "stdout_formatter",
    "syslog",
    "sysmon_handler",
    "systemd",
    "thoas",
)

erlang_dev_package = use_extension(
    "@rules_erlang//bzlmod:extensions.bzl",
    "erlang_package",
)

erlang_dev_package.hex_package(
    name = "amqp",
    build_file = "@rabbitmq-server//bazel:BUILD.amqp",
    patch_args = ["-p1"],
    patches = ["@rabbitmq-server//bazel:amqp.patch"],
    sha256 = "8d3ae139d2646c630d674a1b8d68c7f85134f9e8b2a1c3dd5621616994b10a8b",
    version = "3.3.0",
)

erlang_dev_package.git_package(
    branch = "master",
    build_file = "@//:bazel/BUILD.ct_helper",
    repository = "ninenines/ct_helper",
)

erlang_dev_package.git_package(
    name = "emqtt",
    tag = "1.11.0",
    build_file = "@rabbitmq-server//bazel:BUILD.emqtt",
    repository = "emqx/emqtt",
)

erlang_dev_package.git_package(
    name = "inet_tcp_proxy_dist",
    testonly = True,
    branch = "master",
    repository = "rabbitmq/inet_tcp_proxy",
)

erlang_dev_package.git_package(
    branch = "master",
    build_file = "@rabbitmq-server//bazel:BUILD.meck",
    repository = "eproxus/meck",
)

erlang_dev_package.git_package(
    branch = "master",
    build_file = "@rabbitmq-server//bazel:BUILD.proper",
    repository = "manopapad/proper",
)

erlang_dev_package.hex_package(
    name = "temp",
    build_file = "@rabbitmq-server//bazel:BUILD.temp",
    sha256 = "6af19e7d6a85a427478be1021574d1ae2a1e1b90882586f06bde76c63cd03e0d",
    version = "0.4.7",
)

erlang_dev_package.hex_package(
    name = "x509",
    build_file = "@rabbitmq-server//bazel:BUILD.x509",
    sha256 = "ccc3bff61406e5bb6a63f06d549f3dba3a1bbb456d84517efaaa210d8a33750f",
    version = "0.8.8",
)

use_repo(
    erlang_dev_package,
    "amqp",
    "ct_helper",
    "emqtt",
    "inet_tcp_proxy_dist",
    "meck",
    "proper",
    "temp",
    "x509",
)

secondary_umbrella = use_extension(
    "//bazel/bzlmod:extensions.bzl",
    "secondary_umbrella",
    dev_dependency = True,
)

use_repo(
    secondary_umbrella,
    "rabbitmq-server-generic-unix-3.13",
)

hex = use_extension(
    "//bazel/bzlmod:extensions.bzl",
    "hex",
)

use_repo(
    hex,
    "hex",
)
